package com.foreknow.test;

import com.foreknow.bean.Person;

/**
 * 方法的声明与调用
 */
public class MethodDemo {
    public void m1(){
        System.out.println("11111111");
    }
    public void m2(int a){
        System.out.println(a);
    }

    public int m3(int a){
        return a;
    }

    public void m4(Person person){
        System.out.println(person.getName());
    }
    public static void main(String[] args) {
        MethodDemo methodDemo = new MethodDemo();
        methodDemo.m1();
        methodDemo.m2(1);
        int number = methodDemo.m3(3);
        System.out.println(number);
        Person person = new Person();
        person.setName("tom");
        methodDemo.m4(person);
    }
}
